  For $B \subseteq \mathbb F_q^m$, the $n$-th affine extremal number of $B$ is
the maximum cardinality of a set $A \subseteq \mathbb F_q^n$ with no subset
which is affinely isomorphic to $B$. Furstenberg and Katznelson proved that for
any $B \subseteq \mathbb F_q^m$, the $n$-th affine extremal number of $B$ is
$o(q^n)$ as $n \to \infty$. By counting affine homomorphisms between subsets of
$\mathbb F_q^n$, we derive new bounds and give new proofs of some previously
known bounds for certain affine extremal numbers. At the same time, we
establish corresponding supersaturation results. We connect these bounds to
certain Ramsey-type numbers in vector spaces over finite fields. For $s,t \geq
1$, let $R_q(s,t)$ denote the minimum $n$ such that in every red-blue coloring
of the one-dimensional subspaces of $\mathbb F_q^n$, there is either a red
$s$-dimensional subspace or a blue $t$-dimensional subspace of $\mathbb F_q^n$.
The existence of these numbers is a special case of a well-known theorem of
Graham, Leeb, Rothschild. We improve the best known upper bounds on $R_2(2,t)$,
$R_3(2,t)$, $R_2(t,t)$, and $R_3(t,t)$.
