Assuming that the categories are indicated in the usera field, the following document demonstrates how you can meet requirements 1, 2 and 4.
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=numeric,defernumbers,sorting=ydnt]{biblatex}
\usepackage{hyperref}
\makeatletter
% Store value passed to category option for \printbibliography
\apptocmd{\blx@key@category}{\edef\bbx@thecategory{\detokenize{#1}}}{}{}
% Initialize category counters
\def\bbx@initcategory#1{\csnumgdef{bbx@count@#1}{0}}
\forlistloop{\bbx@initcategory}{\blx@categories}
% Increment category counters
\def\bbx@countcategory#1{%
\iffieldequalstr{usera}{#1}
{\csnumgdef{bbx@count@#1}{\csuse{bbx@count@#1}+1}%
\addtocategory{#1}{\thefield{entrykey}}%
\listbreak}
{}}
\AtDataInput{\forlistloop{\bbx@countcategory}{\blx@categories}}
% Print labelnumber as actual number, plus item total, minus one
\newrobustcmd*{\mkbibdesc}[1]{%
\ifcitation
{\number\numexpr\csuse{bbx@count@\thefield{usera}}+1-#1\relax}
{\number\numexpr\csuse{bbx@count@\bbx@thecategory}+1-#1\relax}}
\makeatother
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}
\begin{filecontents}{test.bib}
@Periodical{jcg,
title = {Computers and Graphics},
issuetitle = {Semantic {3D} Media and Content},
volume = {35},
number = {4},
year = {2011},
issn = {0097-8493}}
@Article{sarfraz,
author = {M. Sarfraz and M. F. A. Razzak},
title = {An algorithm for automatic capturing of the font outlines},
journal = {Computers and Graphics},
volume = {26},
number = {5},
pages = {795--804},
year = {2002},
issn = {0097-8493},
doi = {10.1016/S0097-8493(02)00134-6}}
\end{filecontents}
\addbibresource{biblatex-examples.bib}
\addbibresource{test.bib}
\DeclareBibliographyCategory{primary}
\DeclareBibliographyCategory{secondary}
\defbibheading{bibliography}{\section*{Bibliography}}
\defbibheading{primary}{\subsection*{Primary references}}
\defbibheading{secondary}{\subsection*{Secondary references}}
\begin{document}
Filler text \parencite{companion,cms,sarfraz,nussbaum}.
\printbibheading
\printbibliography[heading=primary,category=primary,prefixnumbers={P}]
Filler text \parencite{ctan}.
\printbibliography[heading=secondary,category=secondary,prefixnumbers={S}]
Filler text \parencite{jcg}.\par\pagebreak
Filler text.
\end{document}

Thanks to a previous answer from PLK, requirement 3 can be supported with biber. The following sourcemap adds the data needed in the usera field. Just save this in a separate file called biber.conf.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<sourcemap>
<maps datatype="bibtex" bmap_overwrite="1">
<map>
<per_datasource>biblatex-examples.bib</per_datasource>
<map_step map_field_set="USERA" map_field_value="primary"/>
</map>
<map>
<per_datasource>test.bib</per_datasource>
<map_step map_field_set="USERA" map_field_value="secondary"/>
</map>
</maps>
</sourcemap>
</config>
Some caveats:
The new format typically needs an extra latex run to get the label numbers right, even if biblatex doesn't tell you to "rerun LaTeX".
The new format will generally screw up citation labels with the sortcites=true or style=numeric-comp option settings, unless all citation lists are limited to a single category. The citation list in the sample document, for example, doesn't meet this condition.
bibfiles don't help. You could adapt this previous answer, but you need to be able to distinguish between the categories from the bibliographic data - not from file membership. – Audrey Feb 13 '12 at 02:52biblatexonly in the answer. – nplatis Feb 13 '12 at 07:35multbibsolution. I was hesitant to retag it because the OP didn't accept my answer. Feel free to answer your own question once you put together a solution. – Audrey Feb 13 '12 at 14:25