Naming tendencies in England in the 19th century for forenames have a lot of monotony to them. 1800 the top name is John at 21.5% of males, only taken over in 1840 by William at 15.4%. In general, all names were from family naming tradition, that is, you were passed a name from someone further along on the family tree. This meant, if there was a "common name", it would be very common, that is, you would see a lot of instances without much effort.
Searching the entirety of London City Directories from 1830 to 1870, I can find only one (1) person with Sherlock as a forename, Sherlock Dovey, a wire worker at St. Crown St. (Note the directory is written as surname first.)
What is findable is Sherlock as a last name -- not extra-common, but notably more prolific; for example, a 1843 London directory gives (again, surname first):
Sherlock Thos. & Co, button manufacturers
Sherlock Mary Elizabeth, millner
Sherlock Thomas, brushmaker
Sherlock Thomas, solicitor
Sherlock William, solicitor
This is borne out by Arthur Conan Doyle's own naming, which he discusses in a 1923 autobiographical article for Collier's.
What should I call the fellow? I still possess the leaf of a notebook with various alternative names. One rebelled against the elementary art which gives some inkling of character in the name and creates Mr Sharps or Mr Ferrets.
(Aside: This does not mean he was actually thinking of those two -- this was indicating he was looking for an "authentic" name.)
First it was Sherringford Holmes; then it was Sherlock Holmes. He could not tell his own exploits, so he must have a commonplace comrade as a foil -- an educated man of action who could both join in the exploits and narrate them. A drab, quiet name for this unostentatious man. Watson would do. And so I had my puppets and wrote my Study in Scarlet.
Where exactly "Sherlock" came from can only then be speculation; it was not too common a surname but also not that rare, and various people have been speculated about (including a cricket player and a police inspector) but the methodical process, being multiple ideas spilled onto a notebook, suggests more of an amalgam of prior contact with Sherlocks as opposed to identifying one in particular.
As the 20th century entered and went on, names started sprouting up due to celebrities (see more on this on my writeup on Tyrone) but at the time the Sherlock Holmes stories came out the family-naming was still standard. So as you might expect, we see no giant up-rise of Sherlock as a forename, in fact, no blip at all.
Sherlock remained relatively unused throughout the 20th century in both the US and UK -- here's a US chart. It is not surprising when a moribund name stays so, although the character Sherlock Holmes has had enough notable movie and TV appearances it is possible the very nature of the detective did not seem worth imitating. However, this may be because he was not a "new" character, something hinted at when a spike finally occurred in 2012; the Office for National Statistics registered the name as making their annual list (3416 out of 4805) and the US stats go up as well. This is just a smidge past the time span for the Robert Downey Jr. movie to be an influence, but notably right on target for the BBC series, starring Benedict Cumberbatch, who -- being placed in modern form, as opposed to a 19th century throwback -- was apparently the star people really needed to see to kickstart some naming tributes.
...
Galbi, D. A. (2002). Long Term Trends in the Frequencies of Given Names. Names, 50(4), 275–288
Hough, C., & Izdebska, D. (Eds.). (2016). The Oxford handbook of names and naming. Oxford University Press.