Maybe I'm misunderstanding your problem statement. But it seems to me that you are using (and paying for) N units from your regular provider. And then your community solar operation is selling S units to the grid and giving you a monetary credit (the result of the sale) instead. Some customer (due to fungibility, it could be you or anyone else) is getting those S units, and paying the community solar project (indirectly via the grid). And those S units are displacing some other set of S units that were previously generated by fossil fuels, which is (presumably) one of the main goals of this entire exercise. So maybe the answer to your final question is actually "only N units were actually generated, because the fossil fuel plants ran less and produced S fewer units".