Q: How to find number of packages installed?

apt list --installed | grep installed 1> stdin1.txt && wc -l stdin1.txt

apt list --installed | grep -c installed

Hey, so after a little help, I used the command: apt list --installed |grep c | wc -l
and I got the right answer. However, I’m confused on why we use the letter “c” for grep?

Hey I tried your command but i doesn’t work for me. i tried all the commands of this topic…

can somebody tell the difference between these 2 command :

apt list --installed | wc -l // wrong but show result
dpkg -l | grep ^ii | wc -l //correct

i dkn why when i use apt list --installed | wc -l is wrong but i use dpkg -l | grep '^ii' | wc -l is true

I have tried all the suggestions shared on this page, but none of them have worked.
In my case the correct answer is 737. I found it by trying number after number one by one.