private int countVote(string type) { int count = 0; foreach (CoordinatePoint cp in coordinatePoints) { if (cp.type == type) count++; } return count; }