remove distinct from count
remove distinct from count

We shouldn't do a distinct count on primary key, as it is not required, and is also slow. See below query run times.

MariaDB [c6b2c772b91fd3d8]> select count(distinct name) from `tabStock Ledger Entry`;
+----------------------+
| count(distinct name) |
+----------------------+
|              3268372 |
+----------------------+
1 row in set (14.65 sec)

MariaDB [c6b2c772b91fd3d8]> select count(name) from `tabStock Ledger Entry`;
+-------------+
| count(name) |
+-------------+
|     3268372 |
+-------------+
1 row in set (0.24 sec)
frappe/frappe,yashodhank/frappe,frappe/frappe,mhbu50/frappe,vjFaLk/frappe,saurabh6790/frappe,StrellaGroup/frappe,yashodhank/frappe,adityahase/frappe,vjFaLk/frappe,adityahase/frappe,mhbu50/frappe,mhbu50/frappe,adityahase/frappe,StrellaGroup/frappe,saurabh6790/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,vjFaLk/frappe,mhbu50/frappe,almeidapaulopt/frappe,saurabh6790/frappe,almeidapaulopt/frappe,vjFaLk/frappe,frappe/frappe,yashodhank/frappe,saurabh6790/frappe,almeidapaulopt/frappe,adityahase/frappe,yashodhank/frappe