Python Count True Values In Array Definition For Math