You are given an n x n matrix isConnected where isConnected[i][j] is 1 when city i and city j are directly connected and 0 otherwise. A province is a group of cities that are connected directly or through other cities. Return how many provinces exist in total.