Use count logic for brain and remove threading

Acidentally left threading on with last commit plus added count logic
rather than  < logic for the cognitive simulaiton.