結果 : count elements in matrix python