Python Count True Values In Array In Sql