mysql select count: レコード数のカウント

mysql> select count(*) from kawasaki;
+———-+
| count(*) |
+———-+
| 69 |
+———-+
1 row in set (0.00 sec)

mysql> select * from staff;
+——+——–+——–+
| id | name | deptid |
+——+——–+——–+
| 1 | yamada | 1 |
| 2 | honda | 4 |
| 3 | kudou | 6 |
| 4 | nishi | 1 |
| 5 | tagawa | 3 |
+——+——–+——–+
5 rows in set (0.00 sec)

mysql> select count(deptid) from staff;
+—————+
| count(deptid) |
+—————+
| 5 |
+—————+
1 row in set (0.00 sec)

データ量なので、重複したデータも+1とカウントされるんですね。