Work that you do while being a student in Canada can count towards your immigration application, but it generally depends on the type of application.
For Canadian Experience Class (CEC), which is the program in which you need a minimum of one-year of full-time Canadian work experience to apply, student work while in Canada does not count. You first need to get your PGWP and then gain experience for that program.
But generally the work experience you get while studying in Canada does count towards other programs if it meets the criteria.
Here is the explanation on the Canada Government site about Studying in Canada and Work Experience.