Before we can get anywhere with this, however, we must first determine how God uses statements in the Bible we consider counterfactual. Is he actually dispensing information concerning an alternate "what-if" reality, a window on his thoughts about possibilities, or is he merely making points rhetorically? If it were any other person speaking that way we would know the answer was "rhetorical," with the all-knowing God we must pause before reaching such a conclusion. Does God know certainly what any of us would do if we were in different circumstances?
There is scriptural warrant to think he does, cases in point:
Ezekiel 3:6b-9 - God knew the hearts of Israel and took steps within Ezekiel's to counteract them;
On the other hand:
Genesis 22:12 - God had to see the determination to act and the act initiated before he could say that he knew that Abraham would not withhold Isaac;
Exodus 13:17-18 - God spoke uncertainly about what the people might do and avoided learning what they would actually do;
Deuteronomy 8:2 - God had to see the heart actualized before he knew for certain what was in it.
I don't know that God meant to establish parallel truth by making counterfactual statements in the Bible. It easy to see these statements as other than the revelation of absolute, certain descriptions of alternate reality. There are obvious other purposes to those counterfactually structured statements that may be more fundamental to their meaning than the apparent counterfactual aspect. As always in biblical interpretation, intent of the (ultimate) author is of paramount importance.
If God had to see something done before he could know it certainly, as seems to be the case in some of the texts cited above, then I think it is safe to say that counterfactuals represent the discernment of God rather than the revelation of an alternate, possible history. Is God accurate in his assessments? Absolutely, but an assessment of a person's character and reactions is not the same as the statement of fact as in a historical narrative. Therefore, counterfactuals in the Bible do not represent an unveiling of Middle Knowledge, but merely the discernment of the all-wise, all-seeing God.
Foreknowledge is based on what God actually sees outside of time, not on permutations of possibilities that he cogitated within the counsels of his own mind before he created. If we posit that God knows with certainty what we would do in any circumstance, that he deliberated through what-ifs of creaturely freedom before he chose what became, we don't have freedom but merely a different way to see Compatibilism. If God has true (that is absolutely certain) counterfactual knowledge of free human action, not founded on what humans actually did, then foreknowledge is "rigged" and compatibilism is true.