If I understand you, you could with this –
int count = 0;
for (boolean[][] bArrArr : StarTrack) {
for (boolean[] bArr : bArrArr) {
for (boolean b : bArr) {
if (b) {
count++;
}
}
}
}
System.out.println(count);
Given your StarTrack
I get the output of
6
2
solved Count the number of “trues” for n booleans [closed]