I am really not able to understand why is it that the current,while finding the magnetic field in the solenoid (ideal one), is not $I$ the current flowing throught the solenoid but $nI$, where $n$ is the number of turns per unit length.
p.s:Using Amperian loop.