They would actually be outnumbered 2:1 by the NYPD.
You forgot the
National Guard and the Naval Militia (1,037 officers and 16,440 men in the former, 84 officers and 1,341 men in the latter). Based on unit locations, I reckon there's about 10,500 troops within New York:
First Brigade, 6th Division (104 Park Avenue, NYC)
- 7th Regiment of Infantry (643 Park Avenue, NYC)
- 12th Regiment of Infantry (120 West 62nd Street, NYC)
- 69th Regiment of Infantry (68 Lexington Avenue, NYC)
- 71st Regiment of Infantry (104 Park Avenue, NYC)
Second Brigade, 6th Division (1322 Bedford Avenue, Brooklyn)
- 14th Regiment of Infantry (1402 Eighth Avenue, Brooklyn)
- 23rd Regiment of Infantry (1322 Bedford Avenue, Brooklyn)
- 47th Regiment of Infantry (355 Marcy Avenue, Brooklyn)
Divisional Cavalry
- First Regiment of Cavalry (12 troops): 1579 Bedford Avenue, Brooklyn
- Squadron A, Cavalry (4 troops): 1339-1349 Madison Avenue, NYC
- Machine Gun Troop, Cavalry: 1339-1349 Madison Avenue, NYC
Divisional Artillery
- First Regiment (4 batteries): 1988 Broadway, NYC
- Second Regiment (3 batteries): 165-179 Clermont Avenue, Brooklyn
- Battery D, Second Regiment: Franklin Avenue and 166th Street, Bronx
Coastal Artillery
- Eighth Coast Defence Command (10 companies): 75 East 94th Street, NYC
- Ninth Coast Defence Command (10 companies): 125 West Fourteenth Street, NYC
Naval Militia
- First Battalion- foot of West 97th Street, North River, NYC
- Second Battalion- foot of 52nd Street, Brooklyn.
The thing about Pearl Harbour is it balances the probability that the attack will bring the US into the war with the possibility of destroying the US Navy's ability to take the fight to the Japanese. This raid would bring the US into the war, without actually causing them anything more than a minor inconvenience. The Germans could try and destroy the docks to prevent reinforcements being sent to the Western front, but there's a lot of them, there'd be nothing stopping US troops from being sent to other ports like Boston, Portland or Halifax instead, and without the raid the reinforcements wouldn't be sent in the first place.
EDIT:
it might prove interesting to research where SS Kaiser Wilhelm came to dock, whether it was along the West Side piers or in Brooklyn
FLYING SQUAD RAIDS LINER AT HOBOKEN; Special Customs Detail Captures Goods Secreted by the Crew of Kaiser Wilhelm II.
After the North German Lloyd Liner Kaiser Wilhelm II., from Southampton, Cherbourg, and Bremen, had landed her passengers at Hoboken yesterday morning, a special detail of Customs Inspectors, known as the "Flying Squad," went on board and made a search above and below decks for contraband goods. (
New York Times, 5th March 1914)
EDIT 2:
Actually, the mention of Hoboken reminds me I should have added some
New Jersey troops (some of which are as close as the Brooklyn ones) into the mix. There are two troops of cavalry in Newark, a field battery at East Orange, the First Infantry at Newark and the Fourth Infantry at Jersey City, and a battalion of the Naval Reserve at Hoboken itself. I'll exclude the Fifth Infantry because it's c.15 miles away, so might not have arrived the same day as the invasion.