\documentclass{article}

\begin{filecontents*}{\jobname.bib}
@abbreviation{pbc,
 short={PBC},
 long={periodic boundary condition}
}
\end{filecontents*}

\usepackage[colorlinks]{hyperref}
\usepackage[
  record,
  shortcuts=abbreviations,
]{glossaries-extra}

\GlsXtrLoadResources[
 src={\jobname},
 category={same as entry}
]

% My hack, see comments around line 35 for explanations
% \newcommand{\glsentrylongplural}{\glsentrylongpl}
% \newcommand{\Glsentrylongplural}{\Glsentrylongpl}
% This is because in glossaries-extra v1.53 glossaries-extra.sty line 7886, the
% definition of \rglsplformat command uses \glsentrylongplural instead of
% \glsentrylongpl, same for \rGlsplformat in line 7896

\glsxtrenablerecordcount
\GlsXtrSetRecordCountAttribute{abbreviation}{1}

\begin{document}

\abp{pbc} 

% If I comment the following line 40 `\ab{pbc}`, lualatex complains:
% ! Undefined control sequence.
% <argument> \glsentrylongplural
%                     {pbc}
% But if I keep the next line, things work fine. Not sure why.
% \ab{pbc}
% Another solution is to define the command \glsentrylongplural,
% see the above two \newcomand at line 22 and 23.
% If they are removed, same error again.

\printunsrtglossaries

\end{document}

% Compiled with:
% lualatex mwe.tex
% bib2gls --record-count mwe
% lualatex mwe.tex
