First you need the assumption that laws of equilibrium thermodynamics apply to a manifestly non-equilibrium case such as a flow. In Modern Thermodynamics by Kondepudi and Prigogine, the authors assert that molecular dynamics simulations show that a fluid element quickly relaxes to thermodynamic equilibrium (locally), and so for most flows we encounter, application of relations from equilibrium thermodynamics is good enough. Once this assumption is made the procedure to find mass flow rate is straight forward:
$$\dot{m}''_\textrm{flow}=\rho u=\frac{p}{\mathcal RT}u$$ gives flow per unit area.
To get mass flow rate over the entire cross-section you integrate above expression over the cross-section:
$$\dot{m}_\textrm{flow}=\int_A ~\mathrm dA ~\frac{p}{\mathcal RT}u$$
in which $p,T,u,$ will depend on position in general. If $p,T,$ are constant over the cross-section, then since flow rate $Q=\int_A ~\mathrm dA ~u$, you get
$$\dot{m}_\textrm{flow}=\frac{p}{\mathcal RT}Q$$
So indeed $Q$ replaces $V$, but only under assumptions made so far.