A subset $X$ of a group $G$ is a set of pairwise noncommuting elements if $ab\neq ba$ for any two distinct elements $a$ and $b$ in $X$. If $|X|\geq |Y|$ for any other set of pairwise noncommuting elements $Y$ in $G$, then $X$ is called a maximal subset of pairwise noncommuting elements and the cardinality of such a subset (if it exists) is denoted by ${\it\omega}(G)$. In this paper, among other things, we prove that, for each positive integer $n$, there are only finitely many groups $G$, up to isoclinism, with ${\it\omega}(G)=n$, and we obtain similar results for groups with exactly $n$ centralisers.