Don't rely on the metronome to count for you. Instead, use it to check and correct your own sense of rhythm and tempo. It's appropriate to use a metronome for a great deal of your technical practice. This includes scales, exercises, and any other difficult technical passages. For a particular passage, begin by experimenting with different tempo settings to find out exactly how fast you can play the passage with perfect accuracy and control.
Most students try to hurry the process by settling on a tempo that is too fast.
This is a great recipe for frustration and failure. It is vital that you hold yourself to the highest standard and choose a tempo that you can truly handle well. Trying to work out a difficult technical passage by playing it over and over again at performance speed will yield disappointing results at best. At worst you may create a habit of mistakes or unevenness, i.e., a bad habit. Once you have determined how fast you can play the passage well, decide which subdivision gets the beat.