And was the pistol a popular weapon from the beginning?
There were hand cannon in the Middle Ages which you could call pistols. But in Europe, there isn't a proliferation of what you'd normally think of as pistols ( small, easy to carry, can be used one-handed) until the invention of the wheel lock- perhaps because it's difficult to use a matchlock pistol, match lit, with a holster; and matchlocks require a bit of fiddling with the match, so they're not quite one-handed things.
That said, the Japanese made matchlock pistols, though firearms came to Japan long after the invention of the wheel lock.