diff --git a/bcbio/rnaseq/count.py b/bcbio/rnaseq/count.py
index <HASH>..<HASH> 100644
--- a/bcbio/rnaseq/count.py
+++ b/bcbio/rnaseq/count.py
@@ -26,8 +26,9 @@ def htseq_count(data):
                 "{cmd}".format(**locals()))
 
     subprocess.check_call(cmd, shell=True)
+    data["count_file"] = out_file
 
-    return out_file
+    return data
 
 def _get_files(data):
     in_file = _get_sam_file(data)
diff --git a/tests/unit/test_count.py b/tests/unit/test_count.py
index <HASH>..<HASH> 100644
--- a/tests/unit/test_count.py
+++ b/tests/unit/test_count.py
@@ -48,8 +48,8 @@ class TestHtseqCount(unittest.TestCase):
         data = {"work_bam": self.in_bam,
                 "config": {"algorithm": {"transcripts": self.in_gtf},
                            "dirs": {"work": self.out_dir}}}
-        out_file = count.htseq_count(data)
-        self.assertTrue(count.is_countfile(out_file))
+        new_data = count.htseq_count(data)
+        self.assertTrue(count.is_countfile(new_data["count_file"]))
 
     def tearDown(self):
         shutil.rmtree(self.out_dir)
Swapped htseq_count output to return a sample dictionary.

Added "count_file" as a field to the sample dictionary.