Here is a quick oneliner that should do the job.
qstat -u username | awk '{if (NR > 5) print}' | wc -l
The number of lines to skip at the top depends on your flavor of PBS. It is 5 on torque and PBS Professional if only one server is available.
Question
How would one request to see the total number of jobs that a user has currently submitted? This could be running jobs, queued jobs, or both. Preferably, I would like to see all of the jobs that I have currently (running and queued).
La solution
Here is a quick oneliner that should do the job.
qstat -u username | awk '{if (NR > 5) print}' | wc -l
The number of lines to skip at the top depends on your flavor of PBS. It is 5 on torque and PBS Professional if only one server is available.