The verb 'to give credit against' is used widely in legal texts. For example,
As a preliminary matter, the court considered whether a Non-defaulting Party who wishes to enforce the payment obligation of the Defaulting Party must give credit for what is due under its part of the swap – that is, whether the Non-defaulting Party is obliged to give credit against the gross liability of the Defaulting Party.
lexology.com/library/detail.aspx?g=684585ed-ef70-4d47-8808-76684b229214
Appellant received credit against the minimum sentence for the 170 days of time served prior to sentencing on the sexual assault conviction. He now asks that we modify the sentence to give credit for time served against the maximum of both sentences and to give credit against the minimum burglary sentence.
leagle.com/decision/19902180792P2d1388_12166.xml/WEEDMAN%20v.%20STATE
What does 'to give credit against something' mean exactly?