  The rank modulation scheme has been proposed for efficient writing and
storing data in non-volatile memory storage. Error-correction in the rank
modulation scheme is done by considering permutation codes. In this paper we
consider codes in the set of all permutations on $n$ elements, $S_n$, using the
Kendall $\tau$-metric. The main goal of this paper is to derive new bounds on
the size of such codes. For this purpose we also consider perfect codes,
diameter perfect codes, and the size of optimal anticodes in the Kendall
$\tau$-metric, structures which have their own considerable interest. We prove
that there are no perfect single-error-correcting codes in $S_n$, where $n>4$
is a prime or $4\leq n\leq 10$. We present lower bounds on the size of optimal
anticodes with odd diameter. As a consequence we obtain a new upper bound on
the size of codes in $S_n$ with even minimum Kendall $\tau$-distance. We
present larger single-error-correcting codes than the known ones in $S_5$ and
$S_7$.
