Configuration problems over finite fields and the Vapnik-Chervonenkis dimension