Probably you get the error because the resource is not found, jsp:resource isn't prepared to get a resource from inside the JCR. Other bad news is that it isn't possible to pass arbitrary parameters to cq:include nor to sling:include (this is other candidate you could use).
One option you have is to set a request attribute and read that inside your script:
<%request.setAtributte("counter", anyvalue);%>
<cq:include script="/apps/components/list-value.jsp" />
<%request.removeAttribute("counter"); %>
it is pretty ugly, but it is the only way I know if you want to continue using cq:include or sling:include.
other option that just came to my mind is to have the script as a tag file, then you could just pass a parameter to it. First create a tag file in JCR, say it will be stored at '/path/to/the/dir/with/tag/files/list-value.tag'. Then you can import and use it (note the '/WEB-INF/tags' prefix, it is important):
<%@taglib prefix="t" tagdir="/WEB-INF/tags/path/to/the/dir/with/tag/files" %>
<t:list-value counter=${counter + 1} />
as a last option, you could rewrite your code in a way that you don't need to pass parameters to the script.