According to
Fleischmann, Peter; Janiszczak, Ingo. On the computation of conjugacy classes of Chevalley groups. Appl. Alg. in Eng., Comm. and Comp. 1996, 7(3), 221--234
the class number of ${\rm F}_4(q)$ is
$q^4 + 2q^3 + 6q^2 + 10q + 19$ if $q = 2^n$,
$q^4 + 2q^3 + 7q^2 + 15q + 30$ if $q = 3^n$, and
$q^4 + 2q^3 + 7q^2 + 15q + 31$ if $q = p^n$ where $p > 3$
(see page 233).
According to Frank Lübeck's database on finite groups of Lie type, the class number of $^2{\rm F}_4(q^2)$ is $q^4+4q^2+17$. In that database you also find class numbers for many other types of finite groups of Lie type.