This document describes a study that evolved two types of neural networks - McCulloch-Pitts networks and spiking Integrate-And-Fire networks - to control autonomous agents performing a memory-dependent counting task. The task requires agents to remain still on food items for an exact number of time steps before consuming them, necessitating the development of a counting mechanism. The study found that spiking networks evolved more successfully and with simpler networks than McCulloch-Pitts networks to solve this task, demonstrating the advantage of spiking dynamics for problems requiring memory. Analysis of the evolved networks revealed their counting mechanisms and how spiking dynamics were utilized for counting.