NbN–Nb–Al superconducting tunnel junctions as photon counting detectors