How to create a google map block to show the number of nodes for a content type

Geofield Map is an advanced, complete and easy-to-use geographical mapping
solution for Drupal 8, based and fully compatible with Geofield
module, which allows you to manage the Geofield with an interactive Map both
in back-end and in the front-end.

It represents the perfect solution for:

geolocate (with one or more locations / geocamps) any field that can be sent
Drupal entity through an interactive Geofield Map widget; do
the locations of each content through a fully customizable interactive
Geofield Map Formatter; expose and consult content completely
integration of customizable map views; implement advanced front end
Google Maps with marker icon and advanced Infowindow customizations,
custom capabilities of Google Map Styles and Marker Clustering; personalize
Properties of Map Geometries (Lines and Polylines, Polygons, Multipolygons,
etc.), according to the Google Maps Polygons APIs;

So, in summary, you need to install this module and add it to your content type.
Then, by creating a custom view, you can achieve what you want.